package com.onesquare.uaa.pojo;

import org.springframework.security.core.GrantedAuthority;

import javax.persistence.*;

@Table(name = "role")
public class Role implements GrantedAuthority {

	@Id
	private String id;

	@Column(nullable = false)
	private String name;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
	public String getAuthority() {
		return name;
	}

	@Override
	public String toString() {
		return name;
	}
}
